home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / zendisk1.zip / LST9-3.ASM < prev    next >
Assembly Source File  |  1990-02-15  |  371b  |  16 lines

  1. ;
  2. ; *** Listing 9-3 ***
  3. ;
  4. ; An example of using AND reg,reg to test for the
  5. ; zero/non-zero status of a register. This is faster
  6. ; (and usually shorter) than CMP reg,0.
  7. ;
  8.     sub    dx,dx    ;set DX to 0, so we don't jump
  9.     call    ZTimerOn
  10.     rept    1000
  11.     and    dx,dx    ;is DX 0?
  12.     jnz    $+2    ;just jumps to the next line if
  13.             ; Z is not set (never jumps)
  14.     endm
  15.     call    ZTimerOff
  16.